<?php 

 function Reajax($num,$info)
{
	$arr=array(
		'error'=>$num,
		'info'=>$info
	);
	echo  json_encode($arr);exit;
}
//时间转换
function Ctime($time=null)
{
	if($time){

		$now = time();

		$diff = $now-$time;

		if($diff<60){
			return "刚刚";
		}elseif($diff<3600){
			return round($diff/60)."分钟前";
		}elseif($diff<86400){
			return round($diff/3600)."小时之前";
		}elseif($diff<(86400*7)){
			return round($diff/86400)."天之前";
		}else{
			return date("Y-m-d H:i:s",$time);
		}
	}else{
		return "请传入想要转换的时间戳";
	}
}










 ?>